	<ui:composition template="/WEB-INF/facelets/faceletEditar.xhtml" 
		xmlns="http://www.w3.org/1999/xhtml" 
		xmlns:ui="http://java.sun.com/jsf/facelets"
		xmlns:h="http://java.sun.com/jsf/html"
		xmlns:f="http://java.sun.com/jsf/core"
		xmlns:p="http://primefaces.org/ui">
		
		<ui:define name="form">
			<h:form styleClass="form-horizontal">
				
				<h:messages id="mensagens" globalOnly="true" style="color:red"></h:messages>	
				
				<fieldset>
					<legend>Pagamentos</legend>
					
					<div class="control-group">
						<h:outputLabel value="Sócios:" for="socio" styleClass="control-label" />
						<p:selectManyCheckbox id="socio" value="#{PagamentoMB.selecaoSocio}" layout="pageDirection" converter="entidadeConverter">  
            				<f:selectItems value="#{PagamentoMB.listaSocio}" var="obj" itemLabel="#{obj.nome}" itemValue="#{obj}"/>
            			</p:selectManyCheckbox>
					</div>
					
					<div class="control-group">
						<h:outputLabel value="Mês:" for="mes" styleClass="control-label" />
						<p:selectOneMenu id="mes" value="#{PagamentoMB.entidade.mes}">
							<f:converter converterId="javax.faces.Integer"></f:converter>
							<f:selectItem itemValue="1" itemLabel="Janeiro"></f:selectItem>
							<f:selectItem itemValue="2" itemLabel="Fevereiro"></f:selectItem>
							<f:selectItem itemValue="3" itemLabel="Março"></f:selectItem>
							<f:selectItem itemValue="4" itemLabel="Abril"></f:selectItem>
							<f:selectItem itemValue="5" itemLabel="Maio"></f:selectItem>
							<f:selectItem itemValue="6" itemLabel="Junho"></f:selectItem>
							<f:selectItem itemValue="7" itemLabel="Julho"></f:selectItem>
							<f:selectItem itemValue="8" itemLabel="Agosto"></f:selectItem>
							<f:selectItem itemValue="9" itemLabel="Setembro"></f:selectItem>
							<f:selectItem itemValue="10" itemLabel="Outubro"></f:selectItem>
							<f:selectItem itemValue="11" itemLabel="Novembro"></f:selectItem>
							<f:selectItem itemValue="12" itemLabel="Dezembro"></f:selectItem>
						</p:selectOneMenu>
						
					</div>
					
					<div class="control-group">
						<h:outputLabel value="Ano:" for="ano" styleClass="control-label" />
						<p:inputMask id="ano" value="#{PagamentoMB.entidade.ano}" maxlength="4" mask="9999"/>
					</div>
					
					<div class="control-group">
						<h:outputLabel value="Valor:" for="valor" styleClass="control-label" />
						<p:inputMask id="valor" value="#{PagamentoMB.entidade.valor}" maxlength="2" mask="99"/>
					</div>
					
					<div class="control-group">
						<p:commandButton 
							value="Gravar" 
							action="#{PagamentoMB.gravar}"
							update="mensagens"/>
						<span></span>
							
						<p:commandButton 
							value="Excluir" 
							action="#{PagamentoMB.excluir}"
							rendered="#{PagamentoMB.exibirExcluir}"
							onclick="confirmation.show()" 
							type="button">
						</p:commandButton>
							
						<p:confirmDialog 
							id="confirmDialog" 
							message="Confimar a exclusão do registro?"  
					        header="Confirmação!" 
					        severity="alert" 
					        widgetVar="confirmation">  
					                 
					    <p:commandButton 
					       	id="confirm" 
					       	value="Sim" 
					       	oncomplete="confirmation.hide()"  
					        action="#{PagamentoMB.excluir}"/>  
					        
					    <p:commandButton 
					       	id="decline" 
					       	value="Não" 
					       	onclick="confirmation.hide()" 
					       	type="button" />   
					                  
					    </p:confirmDialog>  
					</div>
				</fieldset>
			</h:form>
		</ui:define>
	</ui:composition>
